<template>
  <div class="app">
    {{ myTitle }}
    <!-- 1.给组件标签，添加属性方式 赋值 -->
    <Son :title="myTitle" @changeTitle="changeTitle"/>
  </div>
</template>

<script>
import Son from './components/Son.vue'
export default {
  name: 'App',
  data() {
    return {
      myTitle: '我是父组件标题',
    }
  },
  components: {
    Son,
  },
  methods:{
    changeTitle(value){
      this.myTitle = value
    }
  }
}
</script>

<style>
#app {
  border: 3px solid #000;
  margin: 10px
}
</style>